﻿/*********************************************************************************************************************
VanguardDocumentation, Role VanguardDocumentationWriter

This role is for those who are writing documentation. Of course most of these whill be SA:s or DBO:s, but maybe 
they're not. And in any case it is good to have permissions set as documentation of which objects are intended for 
general use and which are for internal use only.

© 2014 Erik Ackerholm

This file is part of SqlVanguard.

SqlVanguard is free software: you can redistribute it and/or modify it under the terms of the GNU General Public 
License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later 
version.

SqlVanguard is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied 
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with SqlVanguard. If not, see 
<http://www.gnu.org/licenses/>.
*********************************************************************************************************************/

if
	not exists (
		select *
		from sys.database_principals
		where name = 'VanguardDocumentationWriter' and [type] = 'R'
	)
begin
	create role VanguardDocumentationWriter;
end;
GO




